﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Linq;
using WPFExcelReport.Helpers;
using System.Windows.Input;
using System.Windows.Controls;
namespace WPFExcelReport
{
    public partial class TWB18X
    { 
        public TWB18X()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VWBFEHL();
            this.DataContext = MV;
            InitializeComponent();
        }
        public override void vwMaster_CurrentChanged(object sender, EventArgs e)
        {
            base.vwMaster_CurrentChanged(sender, e); 
        } 
        public override void OnEXAUFChg(string vlaue)
        {
            TBMain.Clear();
            if (EXAUF.Length < 11)
                return;         
            KRS = EXAUF.Substring(0, 2);
            LFD = EXAUF.Substring(2, 6);
            POS = EXAUF.Substring(8, 4);
            ERVER =int.Parse( EXAUF.Substring(12));
            PM["RWKRS"] = KRS ;
            PM["RWLFD"] = LFD ;
            PM["RWPOS"] = POS;
            PM["ERVER"] = ERVER;
            SResult =TMV.LOADERROR(PM);
            MergeData(SResult, true, true); 
            base.OnEXAUFChg(vlaue);
        } 
    }
}
